use serde::{Deserialize, Serialize};


pub const EVENT_TYPE_NETWORK_ACL_EGRESS_RULES_SETUP: &str =
    "endpoint.traffic_steering_rule.network_acl.egress_rules/setup";

#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct EgressRulesSetupEventPayload {
    pub endpoint_id: String,
    pub traffic_steering_rule_id: String,
    pub network_acl_id: String,
}

pub type EgressRulesSetupEvent = wanmesh_common::dto::Event<EgressRulesSetupEventPayload>;

pub fn new_egress_rules_setup_event(payload: EgressRulesSetupEventPayload) -> EgressRulesSetupEvent {
    EgressRulesSetupEvent {
        event_type: EVENT_TYPE_NETWORK_ACL_EGRESS_RULES_SETUP.to_string(),
        payload,
    }
}
